# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=nbsdgames
pkgver=5
pkgrel=0
pkgdesc="A package of 18 text-based modern games"
url="https://github.com/abakh/nbsdgames"
arch="all"
license="custom"
options="!check"

makedepends="ncurses-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/abakh/nbsdgames/archive/refs/tags/v$pkgver.tar.gz
	fix-makefile-path.patch
	"

build() {
	make all
}

package() {
	mkdir -p "$pkgdir"/usr/share/man/man6
	make DESTDIR="$pkgdir" manpages

	mkdir -p "$pkgdir"/usr/bin
	mkdir -p "$pkgdir"/var/games
	make DESTDIR="$pkgdir" install

	install -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="
04fcc7628b7310bcbebf8ae7e1462605b2a4aa3bc7c50758e8fc54836d18c3d320a1ba5c766d388912d8f9a7a49bf78ba654f1430fdda730daa80ff189f49ffc  nbsdgames-5.tar.gz
2a76cbdba6b150ef445637b3daf7b51a325f5bd88d5e8feb773d725c22c272c4100cae5da84843aafbb71c440d5b2cab1f006f82abd41c31f37a1ad9cd287015  fix-makefile-path.patch
"
